package cn.domypay.mail.bean;

import java.io.*;
import java.util.Date;
import java.util.List;

/**
 * 
 * <p>
 * Title:
 * </p>
 * <p>
 * Description: Swanet common tools
 * </p>
 * <p>
 * Copyright: Copyright (c) 2005
 * </p>
 * <p>
 * Company: Swanet
 * </p>
 * 
 * @author Tim huang
 * @version 1.0
 */

public class EmailMessage implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -408709277645722716L;
	

	private String messageID;

	private EmailUser from;

	private EmailUser to[];

	private EmailUser cc[];

	private EmailUser bcc[];

	private String subject;

	private String content;

	private String contentType;

	private Date sentDate;

	private Date receiveDate;

	private EmailAttachment attachments[];

	private String holder;

	private String files[];

	private int[] attachSize;

	private String path;

	private String isAttach;

	private int mailSize;

	private Mailbox mailbox;//for send mail

	private List headerImage;

	private String emailID;

	private String emailUID;

	private String companyID;
	
	private String ipAddress;
	
	private String companyMailbox;

	public EmailMessage() {
	}

	/**
	 * 
	 * @param msg
	 *            EmailMessage
	 */
	public void copyFrom(EmailMessage msg) {
		from = msg.getFrom();
		to = msg.getTo();
		cc = msg.getCc();
		bcc = msg.getBcc();
		subject = msg.getSubject();
		content = msg.getContent();
		contentType = msg.getContentType();
		sentDate = msg.getSentDate();
		receiveDate = msg.getReceiveDate();
		attachments = msg.getAttachments();
		holder = msg.getHolder();
		files = msg.getFiles();
		isAttach = msg.getIsAttach();
		mailSize = msg.getMailSize();
		attachSize = msg.getAttachSize();
		headerImage = msg.getHeaderImage();
		emailID = msg.getEmailID();
		emailUID = msg.getEmailUID();
		companyID = msg.getCompanyID();
		companyMailbox = msg.getCompanyMailbox();
	}

	public String serial() {
		return toString();
	}

	public EmailAttachment[] getAttachments() {
		return attachments;
	}

	public void setAttachments(EmailAttachment attachments[]) {
		this.attachments = attachments;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	public Date getSentDate() {
		return sentDate;
	}

	public void setSentDate(Date sentDate) {
		this.sentDate = sentDate;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public EmailUser[] getBcc() {
		return bcc;
	}

	public void setBcc(EmailUser bcc[]) {
		this.bcc = bcc;
	}

	public EmailUser[] getCc() {
		return cc;
	}

	public void setCc(EmailUser cc[]) {
		this.cc = cc;
	}

	public EmailUser getFrom() {
		return from;
	}

	public void setFrom(EmailUser from) {
		this.from = from;
	}

	public EmailUser[] getTo() {
		return to;
	}

	public void setTo(EmailUser to[]) {
		this.to = to;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public String[] getFiles() {
		return files;
	}

	public void setFiles(String strings[]) {
		files = strings;
	}

	public String getHolder() {
		return holder;
	}

	public void setHolder(String string) {
		holder = string;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String string) {
		path = string;
	}

	public String getIsAttach() {
		return isAttach;
	}

	public void setIsAttach(String isAttach) {
		this.isAttach = isAttach;
	}

	public int getMailSize() {
		return mailSize;
	}

	public void setMailSize(int mailSize) {
		this.mailSize = mailSize;
	}

	public int[] getAttachSize() {
		return attachSize;
	}

	public void setAttachSize(int[] attachSize) {
		this.attachSize = attachSize;
	}

	public Mailbox getMailbox() {
		return mailbox;
	}

	public void setMailbox(Mailbox mailbox) {
		this.mailbox = mailbox;
	}

	public List getHeaderImage() {
		return headerImage;
	}

	public void setHeaderImage(List headerImage) {
		this.headerImage = headerImage;
	}

	public String getEmailID() {
		return emailID;
	}

	public void setEmailID(String emailID) {
		this.emailID = emailID;
	}

	public String getEmailUID() {
		return emailUID;
	}

	public void setEmailUID(String emailUID) {
		this.emailUID = emailUID;
	}

	/**
	 * @return Returns the companyID.
	 */
	public String getCompanyID() {
		return companyID;
	}

	/**
	 * @param companyID
	 *            The companyID to set.
	 */
	public void setCompanyID(String companyID) {
		this.companyID = companyID;
	}

	/**
	 * @return ���� ipAddress��
	 */
	public String getIpAddress() {
		return ipAddress;
	}

	/**
	 * @param ipAddress Ҫ���õ� ipAddress��
	 */
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	/**
	 * @return ���� messageID��
	 */
	public String getMessageID() {
		return messageID;
	}

	/**
	 * @param messageID Ҫ���õ� messageID��
	 */
	public void setMessageID(String messageID) {
		this.messageID = messageID;
	}

	public String getCompanyMailbox() {
		return companyMailbox;
	}

	public void setCompanyMailbox(String companyMailbox) {
		this.companyMailbox = companyMailbox;
	}
	
	
}
